﻿<%@ Page Language="VB" MasterPageFile="~/WebForm/MasterPage.master" AutoEventWireup="false"
    CodeFile="ManageEmployee.aspx.vb" Inherits="WebForm_ManageEmployee" EnableEventValidation="false" %>

<%@ Register Src="~/WebForm/ManageEmployee/AddEmployee.ascx" TagName="AddEmployee"
    TagPrefix="My" %>
<%@ Register Src="~/WebForm/ManageEmployee/SearchEmployee.ascx" TagName="SearchEmployee"
    TagPrefix="My" %>
<%@ Register Assembly="App_Code" Namespace="My" TagPrefix="My" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table align="center" width="95%">
        <tr>
            <td align="center">
                <asp:Label ID="Title" runat="server" SkinID="title" meta:resourcekey="Page"></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:LinkButton ID="lknAdd" runat="server" meta:resourcekey="lknAdd" 
                   ></asp:LinkButton>
            </td>
        </tr>          
        <tr>
            <td>
                <asp:UpdatePanel ID="up" runat="server" UpdateMode="conditional">
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="lknAdd" />
                    </Triggers>
                    <ContentTemplate>
                        <ajaxToolkit:TabContainer ID="TabContainer1" runat="server" AutoPostBack="false"
                            ActiveTabIndex="0">
                            <ajaxToolkit:TabPanel ID="SearchTabPanel" runat="server" meta:resourcekey="SearchTabPanel">
                                <ContentTemplate>
                                    <My:SearchEmployee ID="SearchEmployee1" runat="server" />
                                    <table runat="server" visible="false">
                                        <tr>
                                            <td>
                                                <asp:Label ID="lblActive" runat="server" meta:resourcekey="lblActive"></asp:Label>
                                                <asp:DropDownList ID="ddlActive" runat="server" AutoPostBack="true">
                                                </asp:DropDownList>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:UpdatePanel ID="up1" runat="server" UpdateMode="conditional">
                                                    <ContentTemplate>
                                                        <asp:TreeView ID="trOrganization" runat="server" ShowLines="true" CssClass="tree">
                                                            <NodeStyle Font-Size="9pt" />
                                                        </asp:TreeView>
                                                    </ContentTemplate>
                                                </asp:UpdatePanel>
                                                <asp:Panel ID="Panel2" runat="server" BorderColor="Black" CssClass="skin0" onClick="jumptoie5(event)">
                                                    <asp:Menu ID="ContextMenu1" runat="server" Font-Size="9pt" Width="100%">
                                                        <StaticItemTemplate>
                                                            <asp:Label ID="lblMenuItem" runat="server" Text='<%# Eval("Text") %>' onclick="if(this.innerText=='停用') return confirm('確定停用?');"></asp:Label>
                                                        </StaticItemTemplate>
                                                        <Items>
                                                            <asp:MenuItem Value="Add" meta:resourcekey="miAdd"></asp:MenuItem>
                                                            <asp:MenuItem Value="Paste" meta:resourcekey="miPaste"></asp:MenuItem>
                                                        </Items>
                                                        <StaticHoverStyle BackColor="#9999FF" />
                                                    </asp:Menu>
                                                </asp:Panel>
                                                <asp:Panel ID="Panel3" runat="server" BorderColor="Black" CssClass="skin0" onClick="jumptoie5(event)">
                                                    <asp:Menu ID="cmEmployee" runat="server" Font-Size="9pt" Width="100%">
                                                        <StaticItemTemplate>
                                                            <asp:Label ID="lblMenuItem" runat="server" Text='<%# Eval("Text") %>' onclick="if(this.innerText=='停用') return confirm('確定停用?');"></asp:Label>
                                                        </StaticItemTemplate>
                                                        <Items>
                                                            <asp:MenuItem Value="Edit" meta:resourcekey="miEdit"></asp:MenuItem>
                                                            <asp:MenuItem Value="Disable" meta:resourcekey="miDisable"></asp:MenuItem>
                                                            <asp:MenuItem Value="Cut" meta:resourcekey="miCut"></asp:MenuItem>
                                                        </Items>
                                                        <StaticHoverStyle BackColor="#9999FF" />
                                                    </asp:Menu>
                                                </asp:Panel>
                                            </td>
                                        </tr>
                                    </table>
                                </ContentTemplate>
                            </ajaxToolkit:TabPanel>
                            <ajaxToolkit:TabPanel ID="AddTabPanel" runat="server" meta:resourcekey="AddTabPanel">
                                <ContentTemplate>
                                    <My:AddEmployee ID="AddEmployee1" runat="server" />
                                </ContentTemplate>
                            </ajaxToolkit:TabPanel>
                        </ajaxToolkit:TabContainer>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </td>
        </tr>
    </table>
    <br />

    <script>
if (ie5||ns6)  
  menuobj=document.getElementById("<%= Me.Panel2.ClientID %>")  ;
  
  //alert(document.onclick);
    </script>

</asp:Content>
